package  test;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import  action.Action;
import  bean.ActionForm;

public class UserAction implements Action {

	public String execute(HttpServletRequest request,
			HttpServletResponse response, ActionForm form, Map actionForward) {
		
		String url = "error";
		UserBean bean = (UserBean)form;
		if(bean.getName().equals(bean.getPassword())){
			url = "success";
		}
		return (String) actionForward.get(url);
	}
	
	

}
